/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.gameshop.factory;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

/**
 *
 * @author MarcioMorando
 */
public class FabricaDeConexao {
     public static Connection conn;
     public static Statement stmt;
     public static ResultSet rs;
    
    String url = "jdbc:mysql://localhost:3306/mydb";
    String driver = "com.mysql.jdbc.Driver";
    String user = "root";
    String password = "root";
    
    public void abrirConexao(){
        try{
            Class.forName(driver);
            conn = DriverManager.getConnection(url, user, password);
            stmt = conn.createStatement();
        }catch(Exception e){
            
        }
    }/*
    public static void main(String[]args){
        FabricaDeConexao fab = new FabricaDeConexao();
        fab.abrirConexao();
    }*/
    
}
